Skip to main content

File Exist

AutomatR.SFTP.FileExist

The "File Exist" activity in AutomatR is part of the SFTP activities package, providing the capability to check whether a specific file exists in the specified SFTP directory. This activity is useful for validating the presence of a file before performing subsequent actions in the automation workflow.

Properties

NameDescription
Input
ClientSpecifies the SFTP client object to connect to the SFTP server.
Server File PathSpecifies the SFTP directory path to check whether the specified file exists.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the activity. Useful for handling synchronization issues.
Output
ResultOutputs a boolean variable indicating whether the specified file was located (true) or not (false).

How to use:

  1. Drag and drop the "File Exist" activity onto the workflow.
  2. Configure the properties by specifying the SFTP client, server file path, and optionally set a delay.
  3. Execute the workflow to check whether the specified file exists in the SFTP directory.
  4. Utilize the boolean output variable "Result" for conditional branching or further actions based on the file's existence.

Example:

Consider an example where the "File Exist" activity is used to check whether a file named "document.txt" exists in the "/Documents/" directory on the SFTP server:

File Exist:
Display Name: "Check Document Existence"
Client: sftpClientObject
Server File Path: "/Documents/document.txt"
Result: isFileExists

In this example, the activity checks whether the file "document.txt" exists in the "/Documents/" directory on the SFTP server. The boolean result is stored in the variable "isFileExists" for further workflow decision-making.